#include <asm.h>
#include <types.h>
#include <stdio.h>

void
kern_backtrace(void)
{
	uint32_t ebp = read_ebp();
	
	while( ebp ){
		printf("ebp 0x%.8x\teip 0x%.8x\n", ebp, *((uint32_t *)ebp + 1));
		ebp = *(uint32_t *)ebp;
	}
}
